package filter

import "github.com/astaxie/beego/context"

/*
json response 403
 */
func Json403(ctx *context.Context, data interface{}) {
	ctx.Output.SetStatus(403)

	d := make(map[string]interface{})
	d["status"] = 403
	d["msg"] = data
	d["data"] = nil
	ctx.Output.JSON(d, false, false)
}

func Json400x(ctx *context.Context, msg string,data interface{}) {
	ctx.Output.SetStatus(400)

	d := make(map[string]interface{})
	d["status"] = 400
	d["msg"] = msg
	d["data"] = data
	ctx.Output.JSON(d, false, false)
}

